home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Your Choice 3
/
Your Choice Software Collection 3.iso
/
os2
/
etelr21
/
etprerec.vrm
< prev
next >
Wrap
Text File
|
1994-09-13
|
6KB
|
253 lines
/* Custom mainline for macro */
call RXFuncAdd "VRLoadFuncs", "VROBJ", "VRLoadFuncs"
call VRLoadFuncs
_VREVersion = SubWord( VRVersion( "VRObj" ), 1, 1 )
if( _VREVersion < 2.10 )then do
call VRMessage "", "This program requires VX-REXX version 2.1 to run.", "Error!"
return 32000
end
signal on SYNTAX name _VRESyntax
signal _VREMain
_VRESyntax:
parse source . . _VRESourceSpec
call VRMessage "", "Syntax error in" _VRESourceSpec "line" SIGL":" ErrorText(rc), "Error!"
call VRFini
exit 32000
_VREMain:
/*:VRX Main
*/
/* Main
*/
Main:
/* Process the arguments.
Get the parent window.
*/
parse source . calledAs .
parent = ""
argCount = arg()
argOff = 0
if( calledAs \= "COMMAND" )then do
if argCount >= 1 then do
parent = arg(1)
argCount = argCount - 1
argOff = 1
end
end
InitArgs.0 = argCount
if( argCount > 0 )then do i = 1 to argCount
InitArgs.i = arg( i + argOff )
end
drop calledAs argCount argOff
/* Load the windows
*/
call VRInit
parse source . . spec
_VREPrimaryWindowPath = ,
VRParseFileName( spec, "dpn" ) || ".VRW"
_VREPrimaryWindow = ,
VRLoad( parent, _VREPrimaryWindowPath )
drop parent spec
if( _VREPrimaryWindow == "" )then do
call VRMessage "", "Cannot load window:" VRError(), ,
"Error!"
_VREReturnValue = 32000
signal _VRELeaveMain
end
/* Process events
*/
call Init
signal on halt
do while( \ VRGet( _VREPrimaryWindow, "Shutdown" ) )
_VREEvent = VREvent()
interpret _VREEvent
end
_VREHalt:
_VREReturnValue = Fini()
call VRDestroy _VREPrimaryWindow
_VRELeaveMain:
call VRFini
exit _VREReturnValue
VRLoadSecondary: procedure
name = arg( 1 )
window = VRLoad( VRWindow(), VRWindowPath(), name )
call VRMethod window, "CenterWindow"
call VRSet window, "Visible", 1
call VRMethod window, "Activate"
return window
/*:VRX EFEnding_GotFocus
*/
EFEnding_GotFocus:
call VRSet 'EFEnding', 'SelectedStart', 1, 'SelectedEnd', Length( VRGet( 'EFEnding', 'Value' ) ) + 1
return
/*:VRX EFEnding_LostFocus
*/
EFEnding_LostFocus:
value = VRGet( 'EFEnding', 'Value' )
if value = '' then
return
call iStrip value' STRIP'
if( Datatype( value ) <> 'NUM' )then do
call VRMessage VRWindow(), 'Non-numeric amount not supported. ', 'Information'
return
end
call iFormat value
call VRSet 'EFEnding', 'Value', value
return
/*:VRX EFFees_GotFocus
*/
EFFees_GotFocus:
call VRSet 'EFFees', 'SelectedStart', 1, 'SelectedEnd', Length( VRGet( 'EFFees', 'Value' ) ) + 1
return
/*:VRX EFFees_LostFocus
*/
EFFees_LostFocus:
value = VRGet( 'EFFees', 'Value' )
if value = '' then
return
call iStrip value' STRIP'
if( Datatype( value ) <> 'NUM' )then do
call VRMessage VRWindow(), 'Non-numeric amount not supported. ', 'Information'
return
end
call iFormat value
call VRSet 'EFFees', 'Value', value
return
/*:VRX EFInterest_GotFocus
*/
EFInterest_GotFocus:
call VRSet 'EFInterest', 'SelectedStart', 1, 'SelectedEnd', Length( VRGet( 'EFInterest', 'Value' ) ) + 1
return
/*:VRX EFInterest_LostFocus
*/
EFInterest_LostFocus:
value = VRGet( 'EFInterest', 'Value' )
if value = '' then
return
call iStrip value' STRIP'
if( Datatype( value ) <> 'NUM' )then do
call VRMessage VRWindow(), 'Non-numeric amount not supported. ', 'Information'
return
end
call iFormat value
call VRSet 'EFInterest', 'Value', value
return
/*:VRX Fini
*/
Fini:
window = VRWindow()
call VRSet window, "Visible", 0
drop window
return 0
/*:VRX Halt
*/
Halt:
signal _VREHalt
return
/*:VRX iFormat
*/
iFormat:
parse arg value
call sformat value
call VRMethod 'Application', 'GetVar', 'rc'
value = rc
return
/*:VRX Init
*/
Init:
call VRMethod 'Application', 'GetVar', 'args.'
Forward = args.1
Zero = args.2
tID = args.3
window = VRWindow()
call VRMethod window, "CenterWindow"
call VRSet window, "Visible", 1
call VRMethod window, "Activate"
drop window
return
/*:VRX iStrip
*/
iStrip:
parse arg value
call sformat value
call VRMethod 'Application', 'GetVar', 'rc'
value = rc
return
/*:VRX PBCancel_Click
*/
PBCancel_Click:
call VRMethod 'Application', 'PostQueue', tID, 1, 'call ReturnFromReconciliation'
call Quit
return
/*:VRX PBHelp_Click
*/
PBHelp_Click:
address cmd 'view e-teller Reconcile'
return
/*:VRX PBOK_Click
*/
PBOK_Click:
args.0 = 4
args.1 = Forward
args.2 = VRGet( 'EFEnding', 'Value' )
args.3 = VRGet( 'EFInterest', 'Value' )
args.4 = VRGet( 'EFFees', 'Value' )
call VRMethod 'Application', 'PutVar', 'args.'
call VRMethod 'Application', 'PostQueue', tID, 1, 'call Do_Reconcile'
signal Quit
return
/*:VRX Quit
*/
Quit:
drop args.
window = VRWindow()
call VRSet window, "Shutdown", 1
drop window
return
/*:VRX Window1_Close
*/
Window1_Close:
call Quit
return
/*:VRX Window1_Create
*/
Window1_Create:
call VRSet 'DTForward', 'Caption', Forward
call VRSet 'EFEnding', 'Value', Zero
call VRSet 'EFInterest', 'Value', Zero
call VRSet 'EFFees', 'Value', Zero
drop Zero
return
/*:VRX Window1_Help
*/
Window1_Help:
address cmd 'view e-teller Reconcile'
return